#! /bin/bash

function cp_interfaces_audiocontrol(){
    echo "do cp interfaces audiocontrol"
    local src_path="$module_path/interfaces"
    local des_path="$module_path/tmp/interfaces"
    if [ ! -d $des_path ]
    then
        mkdir -p $des_path
    fi
    #audiocontrol
    cp -fr $src_path/audiocontrol $des_path
    #rm cpp files
    find $des_path/audiocontrol -name "*.cpp" -o -name "*.h" | xargs -I {} rm {}
    cp $root_dir/$product_out/vendor/bin/hw/vendor.ecarx.xma.audiocontrol@1.0-service $des_path/audiocontrol/1.0/impl/
    #integrated bp file
    cp $src_path/audiocontrol/1.0/impl/Android.lib $des_path/audiocontrol/1.0/impl/Android.bp
    echo "do cp interfaces audiocontrol"
}
cp_interfaces_audiocontrol